<div class="page-list-form">
	<div class="layui-btn-group">
		<a href="__APP__/{$Request.controller}/add.html" class="layui-btn layui-btn-primary"><i class="layui-icon layui-icon-add-1"></i>添加</a>
		<a href="__APP__/{$Request.controller}/del.html" class="layui-btn layui-btn-primary confirm ajax"><i class="layui-icon layui-icon-close"></i>删除</a>
		<a href="__APP__/{$Request.controller}/cache.html" class="layui-btn layui-btn-primary ajax"><i class="layui-icon layui-icon-refresh"></i>缓存</a>
		<a href="{$Request.url}" class="layui-btn layui-btn-primary ajax"><i class="layui-icon layui-icon-chart"></i>导出EXCEL</a>
	</div>
	<div class="page-filter fr">
		<form class="layui-form layui-form-pane" action="__APP__/{$Request.controller}/index.html" method="get">
		<div class="layui-form-item">
			<div class="layui-input-inline">
				<select name="outprice">
					<option value="0" selected>--全部--</option>
					<option value="0" {eq name="Request.get.outprice" value="0"}selected{/eq}>未售出</option>
					<option value="1" {eq name="Request.get.outprice" value="1"}selected{/eq}>已售出</option>
				</select>
			</div>
			<div class="layui-input-inline">
				<input type="text" name="date" placeholder="--买入时间--" class="layui-input" value="{:input('date')}" id="range">
			</div>
			<div class="layui-input-inline">
				<input type="text" name="out_date" placeholder="--卖出时间--" class="layui-input" value="{:input('out_date')}" id="out_date">
			</div>
			<div class="layui-input-inline">
				<input type="text" name="keywords" lay-verify="required" placeholder="请输入关键词搜索" autocomplete="off" class="layui-input" value="{:input('keywords')}">
				<button class="layui-icon">&#xe615;</button>
			</div>
		</div>
		</form>
	</div>
	<div class="layui-form">
		{Data:list keywords="request" date="request" out_date="request" outprice="request" order="id desc"}
		<table class="layui-table" lay-even="" lay-skin="row">
			<colgroup><col width="50"></colgroup>
			<thead>
				<tr>
					<th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose"></th>
					<th>序号</th>
					<th>买入日期</th>
					<th>概要</th>
					<th>买入金额</th>
					<th>其他费用</th>
					<th>卖出金额</th>
					<th>卖出日期</th>
					<th>利润</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				{volist name="var.list" id="vo"}
				<tr>
					<td><input type="checkbox" name="ids[{$vo.id}]" value="{$vo.id}" class="layui-checkbox checkbox-ids" lay-skin="primary"></td>
					<td>{:Input('page',0,'intval')*10+($key+1)}</td>
					<td>{$vo.date}</td>
					<td>{$vo.des}</td>
					<td>{$vo.inprice}</td>
					<td>{$vo.other}</td>
					<td>{$vo.outprice}</td>
					<td>{$vo.out_date}</td>
					<td>{$vo['outprice']==0 ? 0 : ($vo['outprice']-$vo['other']-$vo['inprice'])}</td>
					<td>
						<div class="layui-btn-group">
							<div class="layui-btn-group opration">
								<a href="__APP__/{$Request.controller}/edit/id/{$vo.id}.html" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon layui-icon-edit"></i></a>
								<a href="__APP__/{$Request.controller}/del/ids/{$vo.id}.html" class="layui-btn layui-btn-primary layui-btn-sm ajax"><i class="layui-icon layui-icon-close"></i></a>
							</div>
						</div>
					</td>
				</tr>
				{/volist}
			</tbody>
		</table>
		{$var.page|raw}
		{/Data:list}
	</div>
</div>
<script type="text/javascript">
	layui.use('laydate',function(){
		layui.laydate.render({ 
		  elem: '#range'
		  ,type: 'month'
		});
		layui.laydate.render({ 
		  elem: '#out_date'
		  ,type: 'month'
		});
		 
	})
</script>